package com.graviton;

public class CharReader {

    private int post;

    private char[] value;

    public CharReader (String jsonStr){
        post = 0;
        value = jsonStr.toCharArray();
    }

    public static CharReader read (String jsonStr) {
       return new CharReader(jsonStr);
    }

    public char getChar() {
        return value[post++];
    }

    public char getCharNotMovePoint() {
        return value[post];
    }

    public boolean isEnd() {
        return post == value.length;
    }

    public int getPosition(){
        return post;
    }

}
